<%@ page language="java" import="java.util.*" pageEncoding="utf-8" 
import="org.htmlparser.NodeFilter" 
import="org.htmlparser.Parser" 
import="org.htmlparser.filters.HasAttributeFilter"
import="org.htmlparser.filters.NodeClassFilter" 
import="org.htmlparser.filters.TagNameFilter"
import="org.htmlparser.tags.ScriptTag"
import="org.htmlparser.util.NodeList"
import="org.htmlparser.util.ParserException"
%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ page contentType="text/html; charset=utf-8"%>
<!DOCTYPE HTML>
<html>
<head>
    <base href="<%=basePath%>">
    <title>共青团常熟职业教育中心校委员会</title>
    <script src="./js/jquery.js" type="text/javascript"></script>
    <script src="./js/index.js" type="text/javascript"></script>
    <link rel="stylesheet" href="./css/index.css" type="text/css"/>
</head>
<body >
    <div id="title">
        <img id="clogo" src="img/clogo.png"/>
        <img id="slogo" src="img/slogo.png" />
    </div>
    <div class="clear"></div>
    <div id="content">    
        <div id="links">
                <a href=""><img class="pic" src="img/microtrain.png"/></a>
                <a href="checklogin.action?module=1"><img class="pic" src="./img/member.png"/></a>
                <a href="checklogin.action?module=2"><img class="pic" src="img/test.png"/></a>
                <a href=""><img class="pic" src="img/help.png"/></a>
                <a href="checklogin.action?module=3"><img class="pic" id="pic2" src="img/ecard.png"/></a>
                <a href=""><img class="pic" src="img/job.png"/></a>
                <a href=""><img class="pic" src="img/savecard.png"/></a>
            </div>
            <div id="links2">
                <a href="checklogin.action?module=4"><img class="pic" src="img/train.png"/></a>
                <a href=""><img class="pic" src="img/shop.png"/></a>
            </div>
        <div id="rmessage">
<%
	Parser parser1 = new Parser();
	parser1.setURL("http://222.92.41.195/index.aspx");
	if(null=="UTF-8"){
		parser1.setEncoding(parser1.getEncoding());
	}else{
		parser1.setEncoding("UTF-8");
	}
	//过滤页面中的链接标签
	NodeFilter filter2 = new NodeClassFilter(ScriptTag.class);
	NodeList list2 = parser1.extractAllNodesThatMatch(filter2);
	String innerString2 = list2.toHtml();
	String is11 = ",\\[ \" ";
	String is22 = " \" , \" ";
	//获取地址
	String[] s11 = new String[5];
	//获取链接
	String[] s22 = new String[5];
	//获取名称
	String[] s33 = new String[5];
	int i2,j2,n2;
	n2 = 0;
	s11[0] = "";
	String[] temp12 = innerString2.split(is11);
	for(i2=0;i2<5;i2++){
		String[] temp112 = temp12[i2+1].split(is22);
		s11[i2] = "http://222.92.41.195" + temp112[0];
		s22[i2] = "http://222.92.41.195" + temp112[1];
		String[] temp222 = temp112[2].split(" \" \\]");
		s33[i2] = temp222[0];
	}	                    	    
 %>
            <div id="MDCcurrencyFocus_2" href="<%=s22[0]%>">
                <img src="<%=s11[0]%> " open=" <%=s22[0]%> ">
            </div>
    <%   
        Parser parser = new Parser("http://222.92.41.195/index.aspx");   
        NodeFilter filter = new HasAttributeFilter("class", "i_join i_u_def5");
        NodeList list = parser.extractAllNodesThatMatch(filter);
        NodeFilter filter1 = new TagNameFilter("div");
        list = list.extractAllNodesThatMatch(filter1, true);
        String innerString = list.toHtml();
        String is1 = "<li><a href=\"";
        String is2 = "\" class=\"item_title\" title=\"";
        //System.out.println(is1+"\n"+is2+"\n"+is3+"\n"+is4);
        //获取链接
        String[] s1 = new String[5];
        //获取文字内容
        String[] s2 = new String[5];
        //获取日期
        String[] s3 = new String[5];
        int i,j,n;
        n = 0;
        s1[0] = "";
        String[] temp1 = innerString.split(is1);
        for(i=0;i<5;i++){
        	String[] temp11 = temp1[i+1].split(is2);
        	s1[i] = "http://222.92.41.195" + temp11[0];
        	String[] temp22 = temp11[1].split("\">");
        	s2[i] = temp22[0];
        	String[] temp33 = temp22[1].split("</a>");
        	String[] temp44 = temp33[1].split("</li>");
        	s3[i] = temp44[0];
        }
    %>
            <div id="bgwhite">
                <div id="inform" >
                    <h3 id="tline">
                    <a href="http://222.92.41.195/article/14.aspx" id="tt">通知公告</a>
                    <a href="http://222.92.41.195/article/14.aspx" id="tm"> 更多 </a>
                    </h3>
                    <ul >
                        <li><a href="<%=s1[0]%>"  title="<%=s2[0] %>"><%=s2[0]%></a><%=s3[0]%></li>
                        <li><a href="<%=s1[1]%>"  title="<%=s2[1] %>"><%=s2[1]%></a><%=s3[1]%></li>
                        <li><a href="<%=s1[2]%>"  title="<%=s2[2] %>"><%=s2[2]%></a><%=s3[2]%></li>
                        <li><a href="<%=s1[3]%>"  title="<%=s2[3] %>"><%=s2[3]%></a><%=s3[3]%></li>
                        <li><a href="<%=s1[4]%>"  title="<%=s2[4] %>"><%=s2[4]%></a><%=s3[4]%></li>
                    </ul>
                </div>
            </div>
        </div>    
    </div>
    <div class="clear"></div> 
    <div id="footer">
        <img id="school" src="img/school.png"/>
    </div>
        <script>
		var MDCcurrencyFocus_2=new MDCcurrencyFocus({
		id:"#MDCcurrencyFocus_2",//id
		bigImgW:"300",//大图宽
		bigImgH:"210",//大图高
		speed:"3000",//转刷速度,默认为5秒
		place:"2",//按扭位置 1下左 2下右 3上左 4上右
		text:"1",//是否显示文字标签 1显示 0不显示
		txtColor:"#333",//文字色
		bgColor:"#ddd"//背景色
		}
		,[ " <%=s11[0]%> " , " <%=s22[0]%> " , " <%=s33[0]%> " ],[ " <%=s11[1]%> " , " <%=s22[1]%> " , " <%=s33[1]%> " ],[ " <%=s11[2]%> " , " <%=s22[2]%> " , " <%=s33[2]%> " ],[ " <%=s11[3]%> " , " <%=s22[3]%> " , " <%=s33[3]%> " ],[ " <%=s11[4]%> " , " <%=s22[4]%> " , " <%=s33[4]%> " ]		
		);
		MDCcurrencyFocus_2.init();
	</script>
</body>
</html>
